package com.bupt.datacollect.mapper;

import com.bupt.datacollect.data.Mapping;
import com.bupt.datacollect.data.Packet;
import com.bupt.datacollect.dto.Energy;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface PacketListMapper {
    List<Packet> packetList(@Param("id") String id,
                            @Param("startTime") String startTime,
                            @Param("endTime") String endTime,
                            @Param("alertType") String alertType,
                            @Param("validatedType") String validatedType,
                            @Param("start") Integer start,
                            @Param("limit") Integer limit);

    Integer getTotalRecords(@Param("id") String id,
                            @Param("startTime") String startTime,
                            @Param("endTime") String endTime,
                            @Param("alertType") String alertType,
                            @Param("validatedType") String validatedType);
    //给每个能量计看的
    List<Packet> metetPacketList(@Param("id") String id,
                                 @Param("start") Integer start,
                                 @Param("limit") Integer limit);
    //给每个能量计看的
    Integer getMeterTotalRecords(@Param("id") String id);

    List<Energy> getEneryTotal(@Param("id") Integer id);

    List<Mapping> getMapping();

    String getMeterId(@Param("carId") String carId);

    List<Packet> checkAlarm();

    Packet lastestSingle(@Param("meterId") Integer meterId);

    List<Integer> lastestId(@Param("start") Integer start,
                            @Param("limit") Integer limit);
    List<Integer> lastestIdSize();

    Packet getPacketById(@Param("id") Integer id);
}
